(0) Obligation:

Clauses:

insert(X, void, tree(X, void, void)).
insert(X, tree(X, Left, Right), tree(X, Left, Right)).
insert(X, tree(Y, Left, Right), tree(Y, Left1, Right)) :- ','(less(X, Y), insert(X, Left, Left1)).
insert(X, tree(Y, Left, Right), tree(Y, Left, Right1)) :- ','(less(Y, X), insert(X, Right, Right1)).
less(0, s(X1)).
less(s(X), s(Y)) :- less(X, Y).

Query: insert(a,g,a)

(1) PrologToDTProblemTransformerProof (SOUND transformation)

Built DT problem from termination graph DT10.

(2) Obligation:

Triples:

insertA(tree(X1, X2, X3), tree(X1, X4, X3)) :- ','(lesscB(X1), insertA(X2, X4)).
insertA(tree(X1, X2, X3), tree(X1, X2, X4)) :- ','(lesscC(X1), insertA(X3, X4)).
lessD(s(X1), s(X2)) :- lessD(X1, X2).
insertE(X1, tree(s(X2), X3, X4), tree(s(X2), X5, X4)) :- lessG(X1, X2).
insertE(X1, tree(X2, X3, X4), tree(X2, X5, X4)) :- ','(lesscF(X1, X2), insertE(X1, X3, X5)).
insertE(X1, tree(X2, X3, X4), tree(X2, X3, X5)) :- lessG(X2, s(X1)).
insertE(X1, tree(X2, X3, X4), tree(X2, X3, X5)) :- ','(lesscG(X2, s(X1)), insertE(X1, X4, X5)).
lessG(s(X1), s(X2)) :- lessG(X1, X2).
lessK(s(X1), s(X2)) :- lessK(X1, X2).
pI(X1, X2, X3, X4) :- lessD(X1, X2).
pI(X1, X2, X3, X4) :- ','(lesscD(X1, X2), insertE(X1, X3, X4)).
pJ(X1, X2, X3, X4) :- lessK(X1, X2).
pJ(X1, X2, X3, X4) :- ','(lesscK(X1, X2), insertH(X2, X3, X4)).
insertH(0, tree(s(X1), X2, X3), tree(s(X1), X4, X3)) :- insertA(X2, X4).
insertH(s(X1), tree(s(X2), X3, X4), tree(s(X2), X5, X4)) :- pI(X1, X2, X3, X5).
insertH(X1, tree(X2, X3, X4), tree(X2, X3, X5)) :- pJ(X2, X1, X4, X5).
insertH(s(X1), tree(0, X2, X3), tree(0, X2, X4)) :- insertH(s(X1), X3, X4).
insertH(s(X1), tree(s(X2), X3, X4), tree(s(X2), X3, X5)) :- lessK(X2, X1).
insertH(s(X1), tree(s(X2), X3, X4), tree(s(X2), X3, X5)) :- ','(lesscK(X2, X1), insertH(s(X1), X4, X5)).
insertH(0, tree(s(X1), X2, X3), tree(s(X1), X4, X3)) :- insertA(X2, X4).
insertH(s(X1), tree(s(X2), X3, X4), tree(s(X2), X5, X4)) :- pI(X1, X2, X3, X5).
insertH(X1, tree(X2, X3, X4), tree(X2, X3, X5)) :- pJ(X2, X1, X4, X5).
insertH(s(X1), tree(0, X2, X3), tree(0, X2, X4)) :- insertH(s(X1), X3, X4).
insertH(s(X1), tree(s(X2), X3, X4), tree(s(X2), X3, X5)) :- lessK(X2, X1).
insertH(s(X1), tree(s(X2), X3, X4), tree(s(X2), X3, X5)) :- ','(lesscK(X2, X1), insertH(s(X1), X4, X5)).

Clauses:

insertcA(void, tree(0, void, void)).
insertcA(tree(0, X1, X2), tree(0, X1, X2)).
insertcA(tree(X1, X2, X3), tree(X1, X4, X3)) :- ','(lesscB(X1), insertcA(X2, X4)).
insertcA(tree(X1, X2, X3), tree(X1, X2, X4)) :- ','(lesscC(X1), insertcA(X3, X4)).
lesscD(0, s(X1)).
lesscD(s(X1), s(X2)) :- lesscD(X1, X2).
insertcE(X1, void, tree(s(X1), void, void)).
insertcE(X1, tree(s(X1), X2, X3), tree(s(X1), X2, X3)).
insertcE(X1, tree(X2, X3, X4), tree(X2, X5, X4)) :- ','(lesscF(X1, X2), insertcE(X1, X3, X5)).
insertcE(X1, tree(X2, X3, X4), tree(X2, X3, X5)) :- ','(lesscG(X2, s(X1)), insertcE(X1, X4, X5)).
lesscG(0, s(X1)).
lesscG(s(X1), s(X2)) :- lesscG(X1, X2).
insertcH(X1, void, tree(X1, void, void)).
insertcH(X1, tree(X1, X2, X3), tree(X1, X2, X3)).
insertcH(0, tree(s(X1), X2, X3), tree(s(X1), X4, X3)) :- insertcA(X2, X4).
insertcH(s(X1), tree(s(X2), X3, X4), tree(s(X2), X5, X4)) :- qcI(X1, X2, X3, X5).
insertcH(X1, tree(X2, X3, X4), tree(X2, X3, X5)) :- qcJ(X2, X1, X4, X5).
insertcH(s(X1), tree(0, X2, X3), tree(0, X2, X4)) :- insertcH(s(X1), X3, X4).
insertcH(s(X1), tree(s(X2), X3, X4), tree(s(X2), X3, X5)) :- ','(lesscK(X2, X1), insertcH(s(X1), X4, X5)).
insertcH(0, tree(s(X1), X2, X3), tree(s(X1), X4, X3)) :- insertcA(X2, X4).
insertcH(s(X1), tree(s(X2), X3, X4), tree(s(X2), X5, X4)) :- qcI(X1, X2, X3, X5).
insertcH(X1, tree(X2, X3, X4), tree(X2, X3, X5)) :- qcJ(X2, X1, X4, X5).
insertcH(s(X1), tree(0, X2, X3), tree(0, X2, X4)) :- insertcH(s(X1), X3, X4).
insertcH(s(X1), tree(s(X2), X3, X4), tree(s(X2), X3, X5)) :- ','(lesscK(X2, X1), insertcH(s(X1), X4, X5)).
lesscK(0, s(X1)).
lesscK(s(X1), s(X2)) :- lesscK(X1, X2).
qcI(X1, X2, X3, X4) :- ','(lesscD(X1, X2), insertcE(X1, X3, X4)).
qcJ(X1, X2, X3, X4) :- ','(lesscK(X1, X2), insertcH(X2, X3, X4)).
lesscB(s(X1)).
lesscF(X1, s(X2)) :- lesscG(X1, X2).

Afs:

insertH(x1, x2, x3)  =  insertH(x2)

(3) UndefinedPredicateInTriplesTransformerProof (SOUND transformation)

Deleted triples and predicates having undefined goals [DT09].

(4) Obligation:

Triples:

insertA(tree(X1, X2, X3), tree(X1, X4, X3)) :- ','(lesscB(X1), insertA(X2, X4)).
lessD(s(X1), s(X2)) :- lessD(X1, X2).
insertE(X1, tree(s(X2), X3, X4), tree(s(X2), X5, X4)) :- lessG(X1, X2).
insertE(X1, tree(X2, X3, X4), tree(X2, X5, X4)) :- ','(lesscF(X1, X2), insertE(X1, X3, X5)).
insertE(X1, tree(X2, X3, X4), tree(X2, X3, X5)) :- lessG(X2, s(X1)).
insertE(X1, tree(X2, X3, X4), tree(X2, X3, X5)) :- ','(lesscG(X2, s(X1)), insertE(X1, X4, X5)).
lessG(s(X1), s(X2)) :- lessG(X1, X2).
lessK(s(X1), s(X2)) :- lessK(X1, X2).
pI(X1, X2, X3, X4) :- lessD(X1, X2).
pI(X1, X2, X3, X4) :- ','(lesscD(X1, X2), insertE(X1, X3, X4)).
pJ(X1, X2, X3, X4) :- lessK(X1, X2).
pJ(X1, X2, X3, X4) :- ','(lesscK(X1, X2), insertH(X2, X3, X4)).
insertH(0, tree(s(X1), X2, X3), tree(s(X1), X4, X3)) :- insertA(X2, X4).
insertH(s(X1), tree(s(X2), X3, X4), tree(s(X2), X5, X4)) :- pI(X1, X2, X3, X5).
insertH(X1, tree(X2, X3, X4), tree(X2, X3, X5)) :- pJ(X2, X1, X4, X5).
insertH(s(X1), tree(0, X2, X3), tree(0, X2, X4)) :- insertH(s(X1), X3, X4).
insertH(s(X1), tree(s(X2), X3, X4), tree(s(X2), X3, X5)) :- lessK(X2, X1).
insertH(s(X1), tree(s(X2), X3, X4), tree(s(X2), X3, X5)) :- ','(lesscK(X2, X1), insertH(s(X1), X4, X5)).
insertH(0, tree(s(X1), X2, X3), tree(s(X1), X4, X3)) :- insertA(X2, X4).
insertH(s(X1), tree(s(X2), X3, X4), tree(s(X2), X5, X4)) :- pI(X1, X2, X3, X5).
insertH(X1, tree(X2, X3, X4), tree(X2, X3, X5)) :- pJ(X2, X1, X4, X5).
insertH(s(X1), tree(0, X2, X3), tree(0, X2, X4)) :- insertH(s(X1), X3, X4).
insertH(s(X1), tree(s(X2), X3, X4), tree(s(X2), X3, X5)) :- lessK(X2, X1).
insertH(s(X1), tree(s(X2), X3, X4), tree(s(X2), X3, X5)) :- ','(lesscK(X2, X1), insertH(s(X1), X4, X5)).

Clauses:

insertcA(void, tree(0, void, void)).
insertcA(tree(0, X1, X2), tree(0, X1, X2)).
insertcA(tree(X1, X2, X3), tree(X1, X4, X3)) :- ','(lesscB(X1), insertcA(X2, X4)).
lesscD(0, s(X1)).
lesscD(s(X1), s(X2)) :- lesscD(X1, X2).
insertcE(X1, void, tree(s(X1), void, void)).
insertcE(X1, tree(s(X1), X2, X3), tree(s(X1), X2, X3)).
insertcE(X1, tree(X2, X3, X4), tree(X2, X5, X4)) :- ','(lesscF(X1, X2), insertcE(X1, X3, X5)).
insertcE(X1, tree(X2, X3, X4), tree(X2, X3, X5)) :- ','(lesscG(X2, s(X1)), insertcE(X1, X4, X5)).
lesscG(0, s(X1)).
lesscG(s(X1), s(X2)) :- lesscG(X1, X2).
insertcH(X1, void, tree(X1, void, void)).
insertcH(X1, tree(X1, X2, X3), tree(X1, X2, X3)).
insertcH(0, tree(s(X1), X2, X3), tree(s(X1), X4, X3)) :- insertcA(X2, X4).
insertcH(s(X1), tree(s(X2), X3, X4), tree(s(X2), X5, X4)) :- qcI(X1, X2, X3, X5).
insertcH(X1, tree(X2, X3, X4), tree(X2, X3, X5)) :- qcJ(X2, X1, X4, X5).
insertcH(s(X1), tree(0, X2, X3), tree(0, X2, X4)) :- insertcH(s(X1), X3, X4).
insertcH(s(X1), tree(s(X2), X3, X4), tree(s(X2), X3, X5)) :- ','(lesscK(X2, X1), insertcH(s(X1), X4, X5)).
insertcH(0, tree(s(X1), X2, X3), tree(s(X1), X4, X3)) :- insertcA(X2, X4).
insertcH(s(X1), tree(s(X2), X3, X4), tree(s(X2), X5, X4)) :- qcI(X1, X2, X3, X5).
insertcH(X1, tree(X2, X3, X4), tree(X2, X3, X5)) :- qcJ(X2, X1, X4, X5).
insertcH(s(X1), tree(0, X2, X3), tree(0, X2, X4)) :- insertcH(s(X1), X3, X4).
insertcH(s(X1), tree(s(X2), X3, X4), tree(s(X2), X3, X5)) :- ','(lesscK(X2, X1), insertcH(s(X1), X4, X5)).
lesscK(0, s(X1)).
lesscK(s(X1), s(X2)) :- lesscK(X1, X2).
qcI(X1, X2, X3, X4) :- ','(lesscD(X1, X2), insertcE(X1, X3, X4)).
qcJ(X1, X2, X3, X4) :- ','(lesscK(X1, X2), insertcH(X2, X3, X4)).
lesscB(s(X1)).
lesscF(X1, s(X2)) :- lesscG(X1, X2).

Afs:

insertH(x1, x2, x3)  =  insertH(x2)

(5) TriplesToPiDPProof (SOUND transformation)

We use the technique of [DT09]. With regard to the inferred argument filtering the predicates were used in the following modes:
insertH_in: (f,b,f)
insertA_in: (b,f)
pI_in: (f,b,b,f)
lessD_in: (f,b)
lesscD_in: (f,b)
insertE_in: (b,b,f)
lessG_in: (b,b)
lesscF_in: (b,b)
lesscG_in: (b,b)
pJ_in: (b,f,b,f)
lessK_in: (b,f)
lesscK_in: (b,f)
Transforming TRIPLES into the following Term Rewriting System:
Pi DP problem:
The TRS P consists of the following rules:

INSERTH_IN_AGA(0, tree(s(X1), X2, X3), tree(s(X1), X4, X3)) → U18_AGA(X1, X2, X3, X4, insertA_in_ga(X2, X4))
INSERTH_IN_AGA(0, tree(s(X1), X2, X3), tree(s(X1), X4, X3)) → INSERTA_IN_GA(X2, X4)
INSERTA_IN_GA(tree(X1, X2, X3), tree(X1, X4, X3)) → U1_GA(X1, X2, X3, X4, lesscB_in_g(X1))
U1_GA(X1, X2, X3, X4, lesscB_out_g(X1)) → U2_GA(X1, X2, X3, X4, insertA_in_ga(X2, X4))
U1_GA(X1, X2, X3, X4, lesscB_out_g(X1)) → INSERTA_IN_GA(X2, X4)
INSERTH_IN_AGA(s(X1), tree(s(X2), X3, X4), tree(s(X2), X5, X4)) → U19_AGA(X1, X2, X3, X4, X5, pI_in_agga(X1, X2, X3, X5))
INSERTH_IN_AGA(s(X1), tree(s(X2), X3, X4), tree(s(X2), X5, X4)) → PI_IN_AGGA(X1, X2, X3, X5)
PI_IN_AGGA(X1, X2, X3, X4) → U12_AGGA(X1, X2, X3, X4, lessD_in_ag(X1, X2))
PI_IN_AGGA(X1, X2, X3, X4) → LESSD_IN_AG(X1, X2)
LESSD_IN_AG(s(X1), s(X2)) → U3_AG(X1, X2, lessD_in_ag(X1, X2))
LESSD_IN_AG(s(X1), s(X2)) → LESSD_IN_AG(X1, X2)
PI_IN_AGGA(X1, X2, X3, X4) → U13_AGGA(X1, X2, X3, X4, lesscD_in_ag(X1, X2))
U13_AGGA(X1, X2, X3, X4, lesscD_out_ag(X1, X2)) → U14_AGGA(X1, X2, X3, X4, insertE_in_gga(X1, X3, X4))
U13_AGGA(X1, X2, X3, X4, lesscD_out_ag(X1, X2)) → INSERTE_IN_GGA(X1, X3, X4)
INSERTE_IN_GGA(X1, tree(s(X2), X3, X4), tree(s(X2), X5, X4)) → U4_GGA(X1, X2, X3, X4, X5, lessG_in_gg(X1, X2))
INSERTE_IN_GGA(X1, tree(s(X2), X3, X4), tree(s(X2), X5, X4)) → LESSG_IN_GG(X1, X2)
LESSG_IN_GG(s(X1), s(X2)) → U10_GG(X1, X2, lessG_in_gg(X1, X2))
LESSG_IN_GG(s(X1), s(X2)) → LESSG_IN_GG(X1, X2)
INSERTE_IN_GGA(X1, tree(X2, X3, X4), tree(X2, X5, X4)) → U5_GGA(X1, X2, X3, X4, X5, lesscF_in_gg(X1, X2))
U5_GGA(X1, X2, X3, X4, X5, lesscF_out_gg(X1, X2)) → U6_GGA(X1, X2, X3, X4, X5, insertE_in_gga(X1, X3, X5))
U5_GGA(X1, X2, X3, X4, X5, lesscF_out_gg(X1, X2)) → INSERTE_IN_GGA(X1, X3, X5)
INSERTE_IN_GGA(X1, tree(X2, X3, X4), tree(X2, X3, X5)) → U7_GGA(X1, X2, X3, X4, X5, lessG_in_gg(X2, s(X1)))
INSERTE_IN_GGA(X1, tree(X2, X3, X4), tree(X2, X3, X5)) → LESSG_IN_GG(X2, s(X1))
INSERTE_IN_GGA(X1, tree(X2, X3, X4), tree(X2, X3, X5)) → U8_GGA(X1, X2, X3, X4, X5, lesscG_in_gg(X2, s(X1)))
U8_GGA(X1, X2, X3, X4, X5, lesscG_out_gg(X2, s(X1))) → U9_GGA(X1, X2, X3, X4, X5, insertE_in_gga(X1, X4, X5))
U8_GGA(X1, X2, X3, X4, X5, lesscG_out_gg(X2, s(X1))) → INSERTE_IN_GGA(X1, X4, X5)
INSERTH_IN_AGA(X1, tree(X2, X3, X4), tree(X2, X3, X5)) → U20_AGA(X1, X2, X3, X4, X5, pJ_in_gaga(X2, X1, X4, X5))
INSERTH_IN_AGA(X1, tree(X2, X3, X4), tree(X2, X3, X5)) → PJ_IN_GAGA(X2, X1, X4, X5)
PJ_IN_GAGA(X1, X2, X3, X4) → U15_GAGA(X1, X2, X3, X4, lessK_in_ga(X1, X2))
PJ_IN_GAGA(X1, X2, X3, X4) → LESSK_IN_GA(X1, X2)
LESSK_IN_GA(s(X1), s(X2)) → U11_GA(X1, X2, lessK_in_ga(X1, X2))
LESSK_IN_GA(s(X1), s(X2)) → LESSK_IN_GA(X1, X2)
PJ_IN_GAGA(X1, X2, X3, X4) → U16_GAGA(X1, X2, X3, X4, lesscK_in_ga(X1, X2))
U16_GAGA(X1, X2, X3, X4, lesscK_out_ga(X1, X2)) → U17_GAGA(X1, X2, X3, X4, insertH_in_aga(X2, X3, X4))
U16_GAGA(X1, X2, X3, X4, lesscK_out_ga(X1, X2)) → INSERTH_IN_AGA(X2, X3, X4)
INSERTH_IN_AGA(s(X1), tree(0, X2, X3), tree(0, X2, X4)) → U21_AGA(X1, X2, X3, X4, insertH_in_aga(s(X1), X3, X4))
INSERTH_IN_AGA(s(X1), tree(0, X2, X3), tree(0, X2, X4)) → INSERTH_IN_AGA(s(X1), X3, X4)
INSERTH_IN_AGA(s(X1), tree(s(X2), X3, X4), tree(s(X2), X3, X5)) → U22_AGA(X1, X2, X3, X4, X5, lessK_in_ga(X2, X1))
INSERTH_IN_AGA(s(X1), tree(s(X2), X3, X4), tree(s(X2), X3, X5)) → LESSK_IN_GA(X2, X1)
INSERTH_IN_AGA(s(X1), tree(s(X2), X3, X4), tree(s(X2), X3, X5)) → U23_AGA(X1, X2, X3, X4, X5, lesscK_in_ga(X2, X1))
U23_AGA(X1, X2, X3, X4, X5, lesscK_out_ga(X2, X1)) → U24_AGA(X1, X2, X3, X4, X5, insertH_in_aga(s(X1), X4, X5))
U23_AGA(X1, X2, X3, X4, X5, lesscK_out_ga(X2, X1)) → INSERTH_IN_AGA(s(X1), X4, X5)

The TRS R consists of the following rules:

lesscB_in_g(s(X1)) → lesscB_out_g(s(X1))
lesscD_in_ag(0, s(X1)) → lesscD_out_ag(0, s(X1))
lesscD_in_ag(s(X1), s(X2)) → U28_ag(X1, X2, lesscD_in_ag(X1, X2))
U28_ag(X1, X2, lesscD_out_ag(X1, X2)) → lesscD_out_ag(s(X1), s(X2))
lesscF_in_gg(X1, s(X2)) → U45_gg(X1, X2, lesscG_in_gg(X1, X2))
lesscG_in_gg(0, s(X1)) → lesscG_out_gg(0, s(X1))
lesscG_in_gg(s(X1), s(X2)) → U33_gg(X1, X2, lesscG_in_gg(X1, X2))
U33_gg(X1, X2, lesscG_out_gg(X1, X2)) → lesscG_out_gg(s(X1), s(X2))
U45_gg(X1, X2, lesscG_out_gg(X1, X2)) → lesscF_out_gg(X1, s(X2))
lesscK_in_ga(0, s(X1)) → lesscK_out_ga(0, s(X1))
lesscK_in_ga(s(X1), s(X2)) → U40_ga(X1, X2, lesscK_in_ga(X1, X2))
U40_ga(X1, X2, lesscK_out_ga(X1, X2)) → lesscK_out_ga(s(X1), s(X2))

The argument filtering Pi contains the following mapping:
insertH_in_aga(x1, x2, x3)  =  insertH_in_aga(x2)
tree(x1, x2, x3)  =  tree(x1, x2, x3)
s(x1)  =  s(x1)
insertA_in_ga(x1, x2)  =  insertA_in_ga(x1)
lesscB_in_g(x1)  =  lesscB_in_g(x1)
lesscB_out_g(x1)  =  lesscB_out_g(x1)
pI_in_agga(x1, x2, x3, x4)  =  pI_in_agga(x2, x3)
lessD_in_ag(x1, x2)  =  lessD_in_ag(x2)
lesscD_in_ag(x1, x2)  =  lesscD_in_ag(x2)
lesscD_out_ag(x1, x2)  =  lesscD_out_ag(x1, x2)
U28_ag(x1, x2, x3)  =  U28_ag(x2, x3)
insertE_in_gga(x1, x2, x3)  =  insertE_in_gga(x1, x2)
lessG_in_gg(x1, x2)  =  lessG_in_gg(x1, x2)
lesscF_in_gg(x1, x2)  =  lesscF_in_gg(x1, x2)
U45_gg(x1, x2, x3)  =  U45_gg(x1, x2, x3)
lesscG_in_gg(x1, x2)  =  lesscG_in_gg(x1, x2)
0  =  0
lesscG_out_gg(x1, x2)  =  lesscG_out_gg(x1, x2)
U33_gg(x1, x2, x3)  =  U33_gg(x1, x2, x3)
lesscF_out_gg(x1, x2)  =  lesscF_out_gg(x1, x2)
pJ_in_gaga(x1, x2, x3, x4)  =  pJ_in_gaga(x1, x3)
lessK_in_ga(x1, x2)  =  lessK_in_ga(x1)
lesscK_in_ga(x1, x2)  =  lesscK_in_ga(x1)
lesscK_out_ga(x1, x2)  =  lesscK_out_ga(x1)
U40_ga(x1, x2, x3)  =  U40_ga(x1, x3)
INSERTH_IN_AGA(x1, x2, x3)  =  INSERTH_IN_AGA(x2)
U18_AGA(x1, x2, x3, x4, x5)  =  U18_AGA(x1, x2, x3, x5)
INSERTA_IN_GA(x1, x2)  =  INSERTA_IN_GA(x1)
U1_GA(x1, x2, x3, x4, x5)  =  U1_GA(x1, x2, x3, x5)
U2_GA(x1, x2, x3, x4, x5)  =  U2_GA(x1, x2, x3, x5)
U19_AGA(x1, x2, x3, x4, x5, x6)  =  U19_AGA(x2, x3, x4, x6)
PI_IN_AGGA(x1, x2, x3, x4)  =  PI_IN_AGGA(x2, x3)
U12_AGGA(x1, x2, x3, x4, x5)  =  U12_AGGA(x2, x3, x5)
LESSD_IN_AG(x1, x2)  =  LESSD_IN_AG(x2)
U3_AG(x1, x2, x3)  =  U3_AG(x2, x3)
U13_AGGA(x1, x2, x3, x4, x5)  =  U13_AGGA(x2, x3, x5)
U14_AGGA(x1, x2, x3, x4, x5)  =  U14_AGGA(x1, x2, x3, x5)
INSERTE_IN_GGA(x1, x2, x3)  =  INSERTE_IN_GGA(x1, x2)
U4_GGA(x1, x2, x3, x4, x5, x6)  =  U4_GGA(x1, x2, x3, x4, x6)
LESSG_IN_GG(x1, x2)  =  LESSG_IN_GG(x1, x2)
U10_GG(x1, x2, x3)  =  U10_GG(x1, x2, x3)
U5_GGA(x1, x2, x3, x4, x5, x6)  =  U5_GGA(x1, x2, x3, x4, x6)
U6_GGA(x1, x2, x3, x4, x5, x6)  =  U6_GGA(x1, x2, x3, x4, x6)
U7_GGA(x1, x2, x3, x4, x5, x6)  =  U7_GGA(x1, x2, x3, x4, x6)
U8_GGA(x1, x2, x3, x4, x5, x6)  =  U8_GGA(x1, x2, x3, x4, x6)
U9_GGA(x1, x2, x3, x4, x5, x6)  =  U9_GGA(x1, x2, x3, x4, x6)
U20_AGA(x1, x2, x3, x4, x5, x6)  =  U20_AGA(x2, x3, x4, x6)
PJ_IN_GAGA(x1, x2, x3, x4)  =  PJ_IN_GAGA(x1, x3)
U15_GAGA(x1, x2, x3, x4, x5)  =  U15_GAGA(x1, x3, x5)
LESSK_IN_GA(x1, x2)  =  LESSK_IN_GA(x1)
U11_GA(x1, x2, x3)  =  U11_GA(x1, x3)
U16_GAGA(x1, x2, x3, x4, x5)  =  U16_GAGA(x1, x3, x5)
U17_GAGA(x1, x2, x3, x4, x5)  =  U17_GAGA(x1, x3, x5)
U21_AGA(x1, x2, x3, x4, x5)  =  U21_AGA(x2, x3, x5)
U22_AGA(x1, x2, x3, x4, x5, x6)  =  U22_AGA(x2, x3, x4, x6)
U23_AGA(x1, x2, x3, x4, x5, x6)  =  U23_AGA(x2, x3, x4, x6)
U24_AGA(x1, x2, x3, x4, x5, x6)  =  U24_AGA(x2, x3, x4, x6)

We have to consider all (P,R,Pi)-chains

Infinitary Constructor Rewriting Termination of PiDP implies Termination of TRIPLES

(6) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

INSERTH_IN_AGA(0, tree(s(X1), X2, X3), tree(s(X1), X4, X3)) → U18_AGA(X1, X2, X3, X4, insertA_in_ga(X2, X4))
INSERTH_IN_AGA(0, tree(s(X1), X2, X3), tree(s(X1), X4, X3)) → INSERTA_IN_GA(X2, X4)
INSERTA_IN_GA(tree(X1, X2, X3), tree(X1, X4, X3)) → U1_GA(X1, X2, X3, X4, lesscB_in_g(X1))
U1_GA(X1, X2, X3, X4, lesscB_out_g(X1)) → U2_GA(X1, X2, X3, X4, insertA_in_ga(X2, X4))
U1_GA(X1, X2, X3, X4, lesscB_out_g(X1)) → INSERTA_IN_GA(X2, X4)
INSERTH_IN_AGA(s(X1), tree(s(X2), X3, X4), tree(s(X2), X5, X4)) → U19_AGA(X1, X2, X3, X4, X5, pI_in_agga(X1, X2, X3, X5))
INSERTH_IN_AGA(s(X1), tree(s(X2), X3, X4), tree(s(X2), X5, X4)) → PI_IN_AGGA(X1, X2, X3, X5)
PI_IN_AGGA(X1, X2, X3, X4) → U12_AGGA(X1, X2, X3, X4, lessD_in_ag(X1, X2))
PI_IN_AGGA(X1, X2, X3, X4) → LESSD_IN_AG(X1, X2)
LESSD_IN_AG(s(X1), s(X2)) → U3_AG(X1, X2, lessD_in_ag(X1, X2))
LESSD_IN_AG(s(X1), s(X2)) → LESSD_IN_AG(X1, X2)
PI_IN_AGGA(X1, X2, X3, X4) → U13_AGGA(X1, X2, X3, X4, lesscD_in_ag(X1, X2))
U13_AGGA(X1, X2, X3, X4, lesscD_out_ag(X1, X2)) → U14_AGGA(X1, X2, X3, X4, insertE_in_gga(X1, X3, X4))
U13_AGGA(X1, X2, X3, X4, lesscD_out_ag(X1, X2)) → INSERTE_IN_GGA(X1, X3, X4)
INSERTE_IN_GGA(X1, tree(s(X2), X3, X4), tree(s(X2), X5, X4)) → U4_GGA(X1, X2, X3, X4, X5, lessG_in_gg(X1, X2))
INSERTE_IN_GGA(X1, tree(s(X2), X3, X4), tree(s(X2), X5, X4)) → LESSG_IN_GG(X1, X2)
LESSG_IN_GG(s(X1), s(X2)) → U10_GG(X1, X2, lessG_in_gg(X1, X2))
LESSG_IN_GG(s(X1), s(X2)) → LESSG_IN_GG(X1, X2)
INSERTE_IN_GGA(X1, tree(X2, X3, X4), tree(X2, X5, X4)) → U5_GGA(X1, X2, X3, X4, X5, lesscF_in_gg(X1, X2))
U5_GGA(X1, X2, X3, X4, X5, lesscF_out_gg(X1, X2)) → U6_GGA(X1, X2, X3, X4, X5, insertE_in_gga(X1, X3, X5))
U5_GGA(X1, X2, X3, X4, X5, lesscF_out_gg(X1, X2)) → INSERTE_IN_GGA(X1, X3, X5)
INSERTE_IN_GGA(X1, tree(X2, X3, X4), tree(X2, X3, X5)) → U7_GGA(X1, X2, X3, X4, X5, lessG_in_gg(X2, s(X1)))
INSERTE_IN_GGA(X1, tree(X2, X3, X4), tree(X2, X3, X5)) → LESSG_IN_GG(X2, s(X1))
INSERTE_IN_GGA(X1, tree(X2, X3, X4), tree(X2, X3, X5)) → U8_GGA(X1, X2, X3, X4, X5, lesscG_in_gg(X2, s(X1)))
U8_GGA(X1, X2, X3, X4, X5, lesscG_out_gg(X2, s(X1))) → U9_GGA(X1, X2, X3, X4, X5, insertE_in_gga(X1, X4, X5))
U8_GGA(X1, X2, X3, X4, X5, lesscG_out_gg(X2, s(X1))) → INSERTE_IN_GGA(X1, X4, X5)
INSERTH_IN_AGA(X1, tree(X2, X3, X4), tree(X2, X3, X5)) → U20_AGA(X1, X2, X3, X4, X5, pJ_in_gaga(X2, X1, X4, X5))
INSERTH_IN_AGA(X1, tree(X2, X3, X4), tree(X2, X3, X5)) → PJ_IN_GAGA(X2, X1, X4, X5)
PJ_IN_GAGA(X1, X2, X3, X4) → U15_GAGA(X1, X2, X3, X4, lessK_in_ga(X1, X2))
PJ_IN_GAGA(X1, X2, X3, X4) → LESSK_IN_GA(X1, X2)
LESSK_IN_GA(s(X1), s(X2)) → U11_GA(X1, X2, lessK_in_ga(X1, X2))
LESSK_IN_GA(s(X1), s(X2)) → LESSK_IN_GA(X1, X2)
PJ_IN_GAGA(X1, X2, X3, X4) → U16_GAGA(X1, X2, X3, X4, lesscK_in_ga(X1, X2))
U16_GAGA(X1, X2, X3, X4, lesscK_out_ga(X1, X2)) → U17_GAGA(X1, X2, X3, X4, insertH_in_aga(X2, X3, X4))
U16_GAGA(X1, X2, X3, X4, lesscK_out_ga(X1, X2)) → INSERTH_IN_AGA(X2, X3, X4)
INSERTH_IN_AGA(s(X1), tree(0, X2, X3), tree(0, X2, X4)) → U21_AGA(X1, X2, X3, X4, insertH_in_aga(s(X1), X3, X4))
INSERTH_IN_AGA(s(X1), tree(0, X2, X3), tree(0, X2, X4)) → INSERTH_IN_AGA(s(X1), X3, X4)
INSERTH_IN_AGA(s(X1), tree(s(X2), X3, X4), tree(s(X2), X3, X5)) → U22_AGA(X1, X2, X3, X4, X5, lessK_in_ga(X2, X1))
INSERTH_IN_AGA(s(X1), tree(s(X2), X3, X4), tree(s(X2), X3, X5)) → LESSK_IN_GA(X2, X1)
INSERTH_IN_AGA(s(X1), tree(s(X2), X3, X4), tree(s(X2), X3, X5)) → U23_AGA(X1, X2, X3, X4, X5, lesscK_in_ga(X2, X1))
U23_AGA(X1, X2, X3, X4, X5, lesscK_out_ga(X2, X1)) → U24_AGA(X1, X2, X3, X4, X5, insertH_in_aga(s(X1), X4, X5))
U23_AGA(X1, X2, X3, X4, X5, lesscK_out_ga(X2, X1)) → INSERTH_IN_AGA(s(X1), X4, X5)

The TRS R consists of the following rules:

lesscB_in_g(s(X1)) → lesscB_out_g(s(X1))
lesscD_in_ag(0, s(X1)) → lesscD_out_ag(0, s(X1))
lesscD_in_ag(s(X1), s(X2)) → U28_ag(X1, X2, lesscD_in_ag(X1, X2))
U28_ag(X1, X2, lesscD_out_ag(X1, X2)) → lesscD_out_ag(s(X1), s(X2))
lesscF_in_gg(X1, s(X2)) → U45_gg(X1, X2, lesscG_in_gg(X1, X2))
lesscG_in_gg(0, s(X1)) → lesscG_out_gg(0, s(X1))
lesscG_in_gg(s(X1), s(X2)) → U33_gg(X1, X2, lesscG_in_gg(X1, X2))
U33_gg(X1, X2, lesscG_out_gg(X1, X2)) → lesscG_out_gg(s(X1), s(X2))
U45_gg(X1, X2, lesscG_out_gg(X1, X2)) → lesscF_out_gg(X1, s(X2))
lesscK_in_ga(0, s(X1)) → lesscK_out_ga(0, s(X1))
lesscK_in_ga(s(X1), s(X2)) → U40_ga(X1, X2, lesscK_in_ga(X1, X2))
U40_ga(X1, X2, lesscK_out_ga(X1, X2)) → lesscK_out_ga(s(X1), s(X2))

The argument filtering Pi contains the following mapping:
insertH_in_aga(x1, x2, x3)  =  insertH_in_aga(x2)
tree(x1, x2, x3)  =  tree(x1, x2, x3)
s(x1)  =  s(x1)
insertA_in_ga(x1, x2)  =  insertA_in_ga(x1)
lesscB_in_g(x1)  =  lesscB_in_g(x1)
lesscB_out_g(x1)  =  lesscB_out_g(x1)
pI_in_agga(x1, x2, x3, x4)  =  pI_in_agga(x2, x3)
lessD_in_ag(x1, x2)  =  lessD_in_ag(x2)
lesscD_in_ag(x1, x2)  =  lesscD_in_ag(x2)
lesscD_out_ag(x1, x2)  =  lesscD_out_ag(x1, x2)
U28_ag(x1, x2, x3)  =  U28_ag(x2, x3)
insertE_in_gga(x1, x2, x3)  =  insertE_in_gga(x1, x2)
lessG_in_gg(x1, x2)  =  lessG_in_gg(x1, x2)
lesscF_in_gg(x1, x2)  =  lesscF_in_gg(x1, x2)
U45_gg(x1, x2, x3)  =  U45_gg(x1, x2, x3)
lesscG_in_gg(x1, x2)  =  lesscG_in_gg(x1, x2)
0  =  0
lesscG_out_gg(x1, x2)  =  lesscG_out_gg(x1, x2)
U33_gg(x1, x2, x3)  =  U33_gg(x1, x2, x3)
lesscF_out_gg(x1, x2)  =  lesscF_out_gg(x1, x2)
pJ_in_gaga(x1, x2, x3, x4)  =  pJ_in_gaga(x1, x3)
lessK_in_ga(x1, x2)  =  lessK_in_ga(x1)
lesscK_in_ga(x1, x2)  =  lesscK_in_ga(x1)
lesscK_out_ga(x1, x2)  =  lesscK_out_ga(x1)
U40_ga(x1, x2, x3)  =  U40_ga(x1, x3)
INSERTH_IN_AGA(x1, x2, x3)  =  INSERTH_IN_AGA(x2)
U18_AGA(x1, x2, x3, x4, x5)  =  U18_AGA(x1, x2, x3, x5)
INSERTA_IN_GA(x1, x2)  =  INSERTA_IN_GA(x1)
U1_GA(x1, x2, x3, x4, x5)  =  U1_GA(x1, x2, x3, x5)
U2_GA(x1, x2, x3, x4, x5)  =  U2_GA(x1, x2, x3, x5)
U19_AGA(x1, x2, x3, x4, x5, x6)  =  U19_AGA(x2, x3, x4, x6)
PI_IN_AGGA(x1, x2, x3, x4)  =  PI_IN_AGGA(x2, x3)
U12_AGGA(x1, x2, x3, x4, x5)  =  U12_AGGA(x2, x3, x5)
LESSD_IN_AG(x1, x2)  =  LESSD_IN_AG(x2)
U3_AG(x1, x2, x3)  =  U3_AG(x2, x3)
U13_AGGA(x1, x2, x3, x4, x5)  =  U13_AGGA(x2, x3, x5)
U14_AGGA(x1, x2, x3, x4, x5)  =  U14_AGGA(x1, x2, x3, x5)
INSERTE_IN_GGA(x1, x2, x3)  =  INSERTE_IN_GGA(x1, x2)
U4_GGA(x1, x2, x3, x4, x5, x6)  =  U4_GGA(x1, x2, x3, x4, x6)
LESSG_IN_GG(x1, x2)  =  LESSG_IN_GG(x1, x2)
U10_GG(x1, x2, x3)  =  U10_GG(x1, x2, x3)
U5_GGA(x1, x2, x3, x4, x5, x6)  =  U5_GGA(x1, x2, x3, x4, x6)
U6_GGA(x1, x2, x3, x4, x5, x6)  =  U6_GGA(x1, x2, x3, x4, x6)
U7_GGA(x1, x2, x3, x4, x5, x6)  =  U7_GGA(x1, x2, x3, x4, x6)
U8_GGA(x1, x2, x3, x4, x5, x6)  =  U8_GGA(x1, x2, x3, x4, x6)
U9_GGA(x1, x2, x3, x4, x5, x6)  =  U9_GGA(x1, x2, x3, x4, x6)
U20_AGA(x1, x2, x3, x4, x5, x6)  =  U20_AGA(x2, x3, x4, x6)
PJ_IN_GAGA(x1, x2, x3, x4)  =  PJ_IN_GAGA(x1, x3)
U15_GAGA(x1, x2, x3, x4, x5)  =  U15_GAGA(x1, x3, x5)
LESSK_IN_GA(x1, x2)  =  LESSK_IN_GA(x1)
U11_GA(x1, x2, x3)  =  U11_GA(x1, x3)
U16_GAGA(x1, x2, x3, x4, x5)  =  U16_GAGA(x1, x3, x5)
U17_GAGA(x1, x2, x3, x4, x5)  =  U17_GAGA(x1, x3, x5)
U21_AGA(x1, x2, x3, x4, x5)  =  U21_AGA(x2, x3, x5)
U22_AGA(x1, x2, x3, x4, x5, x6)  =  U22_AGA(x2, x3, x4, x6)
U23_AGA(x1, x2, x3, x4, x5, x6)  =  U23_AGA(x2, x3, x4, x6)
U24_AGA(x1, x2, x3, x4, x5, x6)  =  U24_AGA(x2, x3, x4, x6)

We have to consider all (P,R,Pi)-chains

(7) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LOPSTR] contains 6 SCCs with 27 less nodes.

(8) Complex Obligation (AND)

(9) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

LESSK_IN_GA(s(X1), s(X2)) → LESSK_IN_GA(X1, X2)

The TRS R consists of the following rules:

lesscB_in_g(s(X1)) → lesscB_out_g(s(X1))
lesscD_in_ag(0, s(X1)) → lesscD_out_ag(0, s(X1))
lesscD_in_ag(s(X1), s(X2)) → U28_ag(X1, X2, lesscD_in_ag(X1, X2))
U28_ag(X1, X2, lesscD_out_ag(X1, X2)) → lesscD_out_ag(s(X1), s(X2))
lesscF_in_gg(X1, s(X2)) → U45_gg(X1, X2, lesscG_in_gg(X1, X2))
lesscG_in_gg(0, s(X1)) → lesscG_out_gg(0, s(X1))
lesscG_in_gg(s(X1), s(X2)) → U33_gg(X1, X2, lesscG_in_gg(X1, X2))
U33_gg(X1, X2, lesscG_out_gg(X1, X2)) → lesscG_out_gg(s(X1), s(X2))
U45_gg(X1, X2, lesscG_out_gg(X1, X2)) → lesscF_out_gg(X1, s(X2))
lesscK_in_ga(0, s(X1)) → lesscK_out_ga(0, s(X1))
lesscK_in_ga(s(X1), s(X2)) → U40_ga(X1, X2, lesscK_in_ga(X1, X2))
U40_ga(X1, X2, lesscK_out_ga(X1, X2)) → lesscK_out_ga(s(X1), s(X2))

The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
lesscB_in_g(x1)  =  lesscB_in_g(x1)
lesscB_out_g(x1)  =  lesscB_out_g(x1)
lesscD_in_ag(x1, x2)  =  lesscD_in_ag(x2)
lesscD_out_ag(x1, x2)  =  lesscD_out_ag(x1, x2)
U28_ag(x1, x2, x3)  =  U28_ag(x2, x3)
lesscF_in_gg(x1, x2)  =  lesscF_in_gg(x1, x2)
U45_gg(x1, x2, x3)  =  U45_gg(x1, x2, x3)
lesscG_in_gg(x1, x2)  =  lesscG_in_gg(x1, x2)
0  =  0
lesscG_out_gg(x1, x2)  =  lesscG_out_gg(x1, x2)
U33_gg(x1, x2, x3)  =  U33_gg(x1, x2, x3)
lesscF_out_gg(x1, x2)  =  lesscF_out_gg(x1, x2)
lesscK_in_ga(x1, x2)  =  lesscK_in_ga(x1)
lesscK_out_ga(x1, x2)  =  lesscK_out_ga(x1)
U40_ga(x1, x2, x3)  =  U40_ga(x1, x3)
LESSK_IN_GA(x1, x2)  =  LESSK_IN_GA(x1)

We have to consider all (P,R,Pi)-chains

(10) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(11) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

LESSK_IN_GA(s(X1), s(X2)) → LESSK_IN_GA(X1, X2)

R is empty.
The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
LESSK_IN_GA(x1, x2)  =  LESSK_IN_GA(x1)

We have to consider all (P,R,Pi)-chains

(12) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(13) Obligation:

Q DP problem:
The TRS P consists of the following rules:

LESSK_IN_GA(s(X1)) → LESSK_IN_GA(X1)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.

(14) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • LESSK_IN_GA(s(X1)) → LESSK_IN_GA(X1)
    The graph contains the following edges 1 > 1

(15) YES

(16) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

LESSG_IN_GG(s(X1), s(X2)) → LESSG_IN_GG(X1, X2)

The TRS R consists of the following rules:

lesscB_in_g(s(X1)) → lesscB_out_g(s(X1))
lesscD_in_ag(0, s(X1)) → lesscD_out_ag(0, s(X1))
lesscD_in_ag(s(X1), s(X2)) → U28_ag(X1, X2, lesscD_in_ag(X1, X2))
U28_ag(X1, X2, lesscD_out_ag(X1, X2)) → lesscD_out_ag(s(X1), s(X2))
lesscF_in_gg(X1, s(X2)) → U45_gg(X1, X2, lesscG_in_gg(X1, X2))
lesscG_in_gg(0, s(X1)) → lesscG_out_gg(0, s(X1))
lesscG_in_gg(s(X1), s(X2)) → U33_gg(X1, X2, lesscG_in_gg(X1, X2))
U33_gg(X1, X2, lesscG_out_gg(X1, X2)) → lesscG_out_gg(s(X1), s(X2))
U45_gg(X1, X2, lesscG_out_gg(X1, X2)) → lesscF_out_gg(X1, s(X2))
lesscK_in_ga(0, s(X1)) → lesscK_out_ga(0, s(X1))
lesscK_in_ga(s(X1), s(X2)) → U40_ga(X1, X2, lesscK_in_ga(X1, X2))
U40_ga(X1, X2, lesscK_out_ga(X1, X2)) → lesscK_out_ga(s(X1), s(X2))

The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
lesscB_in_g(x1)  =  lesscB_in_g(x1)
lesscB_out_g(x1)  =  lesscB_out_g(x1)
lesscD_in_ag(x1, x2)  =  lesscD_in_ag(x2)
lesscD_out_ag(x1, x2)  =  lesscD_out_ag(x1, x2)
U28_ag(x1, x2, x3)  =  U28_ag(x2, x3)
lesscF_in_gg(x1, x2)  =  lesscF_in_gg(x1, x2)
U45_gg(x1, x2, x3)  =  U45_gg(x1, x2, x3)
lesscG_in_gg(x1, x2)  =  lesscG_in_gg(x1, x2)
0  =  0
lesscG_out_gg(x1, x2)  =  lesscG_out_gg(x1, x2)
U33_gg(x1, x2, x3)  =  U33_gg(x1, x2, x3)
lesscF_out_gg(x1, x2)  =  lesscF_out_gg(x1, x2)
lesscK_in_ga(x1, x2)  =  lesscK_in_ga(x1)
lesscK_out_ga(x1, x2)  =  lesscK_out_ga(x1)
U40_ga(x1, x2, x3)  =  U40_ga(x1, x3)
LESSG_IN_GG(x1, x2)  =  LESSG_IN_GG(x1, x2)

We have to consider all (P,R,Pi)-chains

(17) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(18) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

LESSG_IN_GG(s(X1), s(X2)) → LESSG_IN_GG(X1, X2)

R is empty.
Pi is empty.
We have to consider all (P,R,Pi)-chains

(19) PiDPToQDPProof (EQUIVALENT transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(20) Obligation:

Q DP problem:
The TRS P consists of the following rules:

LESSG_IN_GG(s(X1), s(X2)) → LESSG_IN_GG(X1, X2)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.

(21) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • LESSG_IN_GG(s(X1), s(X2)) → LESSG_IN_GG(X1, X2)
    The graph contains the following edges 1 > 1, 2 > 2

(22) YES

(23) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

INSERTE_IN_GGA(X1, tree(X2, X3, X4), tree(X2, X5, X4)) → U5_GGA(X1, X2, X3, X4, X5, lesscF_in_gg(X1, X2))
U5_GGA(X1, X2, X3, X4, X5, lesscF_out_gg(X1, X2)) → INSERTE_IN_GGA(X1, X3, X5)
INSERTE_IN_GGA(X1, tree(X2, X3, X4), tree(X2, X3, X5)) → U8_GGA(X1, X2, X3, X4, X5, lesscG_in_gg(X2, s(X1)))
U8_GGA(X1, X2, X3, X4, X5, lesscG_out_gg(X2, s(X1))) → INSERTE_IN_GGA(X1, X4, X5)

The TRS R consists of the following rules:

lesscB_in_g(s(X1)) → lesscB_out_g(s(X1))
lesscD_in_ag(0, s(X1)) → lesscD_out_ag(0, s(X1))
lesscD_in_ag(s(X1), s(X2)) → U28_ag(X1, X2, lesscD_in_ag(X1, X2))
U28_ag(X1, X2, lesscD_out_ag(X1, X2)) → lesscD_out_ag(s(X1), s(X2))
lesscF_in_gg(X1, s(X2)) → U45_gg(X1, X2, lesscG_in_gg(X1, X2))
lesscG_in_gg(0, s(X1)) → lesscG_out_gg(0, s(X1))
lesscG_in_gg(s(X1), s(X2)) → U33_gg(X1, X2, lesscG_in_gg(X1, X2))
U33_gg(X1, X2, lesscG_out_gg(X1, X2)) → lesscG_out_gg(s(X1), s(X2))
U45_gg(X1, X2, lesscG_out_gg(X1, X2)) → lesscF_out_gg(X1, s(X2))
lesscK_in_ga(0, s(X1)) → lesscK_out_ga(0, s(X1))
lesscK_in_ga(s(X1), s(X2)) → U40_ga(X1, X2, lesscK_in_ga(X1, X2))
U40_ga(X1, X2, lesscK_out_ga(X1, X2)) → lesscK_out_ga(s(X1), s(X2))

The argument filtering Pi contains the following mapping:
tree(x1, x2, x3)  =  tree(x1, x2, x3)
s(x1)  =  s(x1)
lesscB_in_g(x1)  =  lesscB_in_g(x1)
lesscB_out_g(x1)  =  lesscB_out_g(x1)
lesscD_in_ag(x1, x2)  =  lesscD_in_ag(x2)
lesscD_out_ag(x1, x2)  =  lesscD_out_ag(x1, x2)
U28_ag(x1, x2, x3)  =  U28_ag(x2, x3)
lesscF_in_gg(x1, x2)  =  lesscF_in_gg(x1, x2)
U45_gg(x1, x2, x3)  =  U45_gg(x1, x2, x3)
lesscG_in_gg(x1, x2)  =  lesscG_in_gg(x1, x2)
0  =  0
lesscG_out_gg(x1, x2)  =  lesscG_out_gg(x1, x2)
U33_gg(x1, x2, x3)  =  U33_gg(x1, x2, x3)
lesscF_out_gg(x1, x2)  =  lesscF_out_gg(x1, x2)
lesscK_in_ga(x1, x2)  =  lesscK_in_ga(x1)
lesscK_out_ga(x1, x2)  =  lesscK_out_ga(x1)
U40_ga(x1, x2, x3)  =  U40_ga(x1, x3)
INSERTE_IN_GGA(x1, x2, x3)  =  INSERTE_IN_GGA(x1, x2)
U5_GGA(x1, x2, x3, x4, x5, x6)  =  U5_GGA(x1, x2, x3, x4, x6)
U8_GGA(x1, x2, x3, x4, x5, x6)  =  U8_GGA(x1, x2, x3, x4, x6)

We have to consider all (P,R,Pi)-chains

(24) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(25) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

INSERTE_IN_GGA(X1, tree(X2, X3, X4), tree(X2, X5, X4)) → U5_GGA(X1, X2, X3, X4, X5, lesscF_in_gg(X1, X2))
U5_GGA(X1, X2, X3, X4, X5, lesscF_out_gg(X1, X2)) → INSERTE_IN_GGA(X1, X3, X5)
INSERTE_IN_GGA(X1, tree(X2, X3, X4), tree(X2, X3, X5)) → U8_GGA(X1, X2, X3, X4, X5, lesscG_in_gg(X2, s(X1)))
U8_GGA(X1, X2, X3, X4, X5, lesscG_out_gg(X2, s(X1))) → INSERTE_IN_GGA(X1, X4, X5)

The TRS R consists of the following rules:

lesscF_in_gg(X1, s(X2)) → U45_gg(X1, X2, lesscG_in_gg(X1, X2))
lesscG_in_gg(0, s(X1)) → lesscG_out_gg(0, s(X1))
lesscG_in_gg(s(X1), s(X2)) → U33_gg(X1, X2, lesscG_in_gg(X1, X2))
U45_gg(X1, X2, lesscG_out_gg(X1, X2)) → lesscF_out_gg(X1, s(X2))
U33_gg(X1, X2, lesscG_out_gg(X1, X2)) → lesscG_out_gg(s(X1), s(X2))

The argument filtering Pi contains the following mapping:
tree(x1, x2, x3)  =  tree(x1, x2, x3)
s(x1)  =  s(x1)
lesscF_in_gg(x1, x2)  =  lesscF_in_gg(x1, x2)
U45_gg(x1, x2, x3)  =  U45_gg(x1, x2, x3)
lesscG_in_gg(x1, x2)  =  lesscG_in_gg(x1, x2)
0  =  0
lesscG_out_gg(x1, x2)  =  lesscG_out_gg(x1, x2)
U33_gg(x1, x2, x3)  =  U33_gg(x1, x2, x3)
lesscF_out_gg(x1, x2)  =  lesscF_out_gg(x1, x2)
INSERTE_IN_GGA(x1, x2, x3)  =  INSERTE_IN_GGA(x1, x2)
U5_GGA(x1, x2, x3, x4, x5, x6)  =  U5_GGA(x1, x2, x3, x4, x6)
U8_GGA(x1, x2, x3, x4, x5, x6)  =  U8_GGA(x1, x2, x3, x4, x6)

We have to consider all (P,R,Pi)-chains

(26) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(27) Obligation:

Q DP problem:
The TRS P consists of the following rules:

INSERTE_IN_GGA(X1, tree(X2, X3, X4)) → U5_GGA(X1, X2, X3, X4, lesscF_in_gg(X1, X2))
U5_GGA(X1, X2, X3, X4, lesscF_out_gg(X1, X2)) → INSERTE_IN_GGA(X1, X3)
INSERTE_IN_GGA(X1, tree(X2, X3, X4)) → U8_GGA(X1, X2, X3, X4, lesscG_in_gg(X2, s(X1)))
U8_GGA(X1, X2, X3, X4, lesscG_out_gg(X2, s(X1))) → INSERTE_IN_GGA(X1, X4)

The TRS R consists of the following rules:

lesscF_in_gg(X1, s(X2)) → U45_gg(X1, X2, lesscG_in_gg(X1, X2))
lesscG_in_gg(0, s(X1)) → lesscG_out_gg(0, s(X1))
lesscG_in_gg(s(X1), s(X2)) → U33_gg(X1, X2, lesscG_in_gg(X1, X2))
U45_gg(X1, X2, lesscG_out_gg(X1, X2)) → lesscF_out_gg(X1, s(X2))
U33_gg(X1, X2, lesscG_out_gg(X1, X2)) → lesscG_out_gg(s(X1), s(X2))

The set Q consists of the following terms:

lesscF_in_gg(x0, x1)
lesscG_in_gg(x0, x1)
U45_gg(x0, x1, x2)
U33_gg(x0, x1, x2)

We have to consider all (P,Q,R)-chains.

(28) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • U5_GGA(X1, X2, X3, X4, lesscF_out_gg(X1, X2)) → INSERTE_IN_GGA(X1, X3)
    The graph contains the following edges 1 >= 1, 5 > 1, 3 >= 2

  • U8_GGA(X1, X2, X3, X4, lesscG_out_gg(X2, s(X1))) → INSERTE_IN_GGA(X1, X4)
    The graph contains the following edges 1 >= 1, 5 > 1, 4 >= 2

  • INSERTE_IN_GGA(X1, tree(X2, X3, X4)) → U5_GGA(X1, X2, X3, X4, lesscF_in_gg(X1, X2))
    The graph contains the following edges 1 >= 1, 2 > 2, 2 > 3, 2 > 4

  • INSERTE_IN_GGA(X1, tree(X2, X3, X4)) → U8_GGA(X1, X2, X3, X4, lesscG_in_gg(X2, s(X1)))
    The graph contains the following edges 1 >= 1, 2 > 2, 2 > 3, 2 > 4

(29) YES

(30) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

LESSD_IN_AG(s(X1), s(X2)) → LESSD_IN_AG(X1, X2)

The TRS R consists of the following rules:

lesscB_in_g(s(X1)) → lesscB_out_g(s(X1))
lesscD_in_ag(0, s(X1)) → lesscD_out_ag(0, s(X1))
lesscD_in_ag(s(X1), s(X2)) → U28_ag(X1, X2, lesscD_in_ag(X1, X2))
U28_ag(X1, X2, lesscD_out_ag(X1, X2)) → lesscD_out_ag(s(X1), s(X2))
lesscF_in_gg(X1, s(X2)) → U45_gg(X1, X2, lesscG_in_gg(X1, X2))
lesscG_in_gg(0, s(X1)) → lesscG_out_gg(0, s(X1))
lesscG_in_gg(s(X1), s(X2)) → U33_gg(X1, X2, lesscG_in_gg(X1, X2))
U33_gg(X1, X2, lesscG_out_gg(X1, X2)) → lesscG_out_gg(s(X1), s(X2))
U45_gg(X1, X2, lesscG_out_gg(X1, X2)) → lesscF_out_gg(X1, s(X2))
lesscK_in_ga(0, s(X1)) → lesscK_out_ga(0, s(X1))
lesscK_in_ga(s(X1), s(X2)) → U40_ga(X1, X2, lesscK_in_ga(X1, X2))
U40_ga(X1, X2, lesscK_out_ga(X1, X2)) → lesscK_out_ga(s(X1), s(X2))

The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
lesscB_in_g(x1)  =  lesscB_in_g(x1)
lesscB_out_g(x1)  =  lesscB_out_g(x1)
lesscD_in_ag(x1, x2)  =  lesscD_in_ag(x2)
lesscD_out_ag(x1, x2)  =  lesscD_out_ag(x1, x2)
U28_ag(x1, x2, x3)  =  U28_ag(x2, x3)
lesscF_in_gg(x1, x2)  =  lesscF_in_gg(x1, x2)
U45_gg(x1, x2, x3)  =  U45_gg(x1, x2, x3)
lesscG_in_gg(x1, x2)  =  lesscG_in_gg(x1, x2)
0  =  0
lesscG_out_gg(x1, x2)  =  lesscG_out_gg(x1, x2)
U33_gg(x1, x2, x3)  =  U33_gg(x1, x2, x3)
lesscF_out_gg(x1, x2)  =  lesscF_out_gg(x1, x2)
lesscK_in_ga(x1, x2)  =  lesscK_in_ga(x1)
lesscK_out_ga(x1, x2)  =  lesscK_out_ga(x1)
U40_ga(x1, x2, x3)  =  U40_ga(x1, x3)
LESSD_IN_AG(x1, x2)  =  LESSD_IN_AG(x2)

We have to consider all (P,R,Pi)-chains

(31) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(32) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

LESSD_IN_AG(s(X1), s(X2)) → LESSD_IN_AG(X1, X2)

R is empty.
The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
LESSD_IN_AG(x1, x2)  =  LESSD_IN_AG(x2)

We have to consider all (P,R,Pi)-chains

(33) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(34) Obligation:

Q DP problem:
The TRS P consists of the following rules:

LESSD_IN_AG(s(X2)) → LESSD_IN_AG(X2)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.

(35) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • LESSD_IN_AG(s(X2)) → LESSD_IN_AG(X2)
    The graph contains the following edges 1 > 1

(36) YES

(37) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

U1_GA(X1, X2, X3, X4, lesscB_out_g(X1)) → INSERTA_IN_GA(X2, X4)
INSERTA_IN_GA(tree(X1, X2, X3), tree(X1, X4, X3)) → U1_GA(X1, X2, X3, X4, lesscB_in_g(X1))

The TRS R consists of the following rules:

lesscB_in_g(s(X1)) → lesscB_out_g(s(X1))
lesscD_in_ag(0, s(X1)) → lesscD_out_ag(0, s(X1))
lesscD_in_ag(s(X1), s(X2)) → U28_ag(X1, X2, lesscD_in_ag(X1, X2))
U28_ag(X1, X2, lesscD_out_ag(X1, X2)) → lesscD_out_ag(s(X1), s(X2))
lesscF_in_gg(X1, s(X2)) → U45_gg(X1, X2, lesscG_in_gg(X1, X2))
lesscG_in_gg(0, s(X1)) → lesscG_out_gg(0, s(X1))
lesscG_in_gg(s(X1), s(X2)) → U33_gg(X1, X2, lesscG_in_gg(X1, X2))
U33_gg(X1, X2, lesscG_out_gg(X1, X2)) → lesscG_out_gg(s(X1), s(X2))
U45_gg(X1, X2, lesscG_out_gg(X1, X2)) → lesscF_out_gg(X1, s(X2))
lesscK_in_ga(0, s(X1)) → lesscK_out_ga(0, s(X1))
lesscK_in_ga(s(X1), s(X2)) → U40_ga(X1, X2, lesscK_in_ga(X1, X2))
U40_ga(X1, X2, lesscK_out_ga(X1, X2)) → lesscK_out_ga(s(X1), s(X2))

The argument filtering Pi contains the following mapping:
tree(x1, x2, x3)  =  tree(x1, x2, x3)
s(x1)  =  s(x1)
lesscB_in_g(x1)  =  lesscB_in_g(x1)
lesscB_out_g(x1)  =  lesscB_out_g(x1)
lesscD_in_ag(x1, x2)  =  lesscD_in_ag(x2)
lesscD_out_ag(x1, x2)  =  lesscD_out_ag(x1, x2)
U28_ag(x1, x2, x3)  =  U28_ag(x2, x3)
lesscF_in_gg(x1, x2)  =  lesscF_in_gg(x1, x2)
U45_gg(x1, x2, x3)  =  U45_gg(x1, x2, x3)
lesscG_in_gg(x1, x2)  =  lesscG_in_gg(x1, x2)
0  =  0
lesscG_out_gg(x1, x2)  =  lesscG_out_gg(x1, x2)
U33_gg(x1, x2, x3)  =  U33_gg(x1, x2, x3)
lesscF_out_gg(x1, x2)  =  lesscF_out_gg(x1, x2)
lesscK_in_ga(x1, x2)  =  lesscK_in_ga(x1)
lesscK_out_ga(x1, x2)  =  lesscK_out_ga(x1)
U40_ga(x1, x2, x3)  =  U40_ga(x1, x3)
INSERTA_IN_GA(x1, x2)  =  INSERTA_IN_GA(x1)
U1_GA(x1, x2, x3, x4, x5)  =  U1_GA(x1, x2, x3, x5)

We have to consider all (P,R,Pi)-chains

(38) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(39) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

U1_GA(X1, X2, X3, X4, lesscB_out_g(X1)) → INSERTA_IN_GA(X2, X4)
INSERTA_IN_GA(tree(X1, X2, X3), tree(X1, X4, X3)) → U1_GA(X1, X2, X3, X4, lesscB_in_g(X1))

The TRS R consists of the following rules:

lesscB_in_g(s(X1)) → lesscB_out_g(s(X1))

The argument filtering Pi contains the following mapping:
tree(x1, x2, x3)  =  tree(x1, x2, x3)
s(x1)  =  s(x1)
lesscB_in_g(x1)  =  lesscB_in_g(x1)
lesscB_out_g(x1)  =  lesscB_out_g(x1)
INSERTA_IN_GA(x1, x2)  =  INSERTA_IN_GA(x1)
U1_GA(x1, x2, x3, x4, x5)  =  U1_GA(x1, x2, x3, x5)

We have to consider all (P,R,Pi)-chains

(40) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(41) Obligation:

Q DP problem:
The TRS P consists of the following rules:

U1_GA(X1, X2, X3, lesscB_out_g(X1)) → INSERTA_IN_GA(X2)
INSERTA_IN_GA(tree(X1, X2, X3)) → U1_GA(X1, X2, X3, lesscB_in_g(X1))

The TRS R consists of the following rules:

lesscB_in_g(s(X1)) → lesscB_out_g(s(X1))

The set Q consists of the following terms:

lesscB_in_g(x0)

We have to consider all (P,Q,R)-chains.

(42) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • INSERTA_IN_GA(tree(X1, X2, X3)) → U1_GA(X1, X2, X3, lesscB_in_g(X1))
    The graph contains the following edges 1 > 1, 1 > 2, 1 > 3

  • U1_GA(X1, X2, X3, lesscB_out_g(X1)) → INSERTA_IN_GA(X2)
    The graph contains the following edges 2 >= 1

(43) YES

(44) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

INSERTH_IN_AGA(X1, tree(X2, X3, X4), tree(X2, X3, X5)) → PJ_IN_GAGA(X2, X1, X4, X5)
PJ_IN_GAGA(X1, X2, X3, X4) → U16_GAGA(X1, X2, X3, X4, lesscK_in_ga(X1, X2))
U16_GAGA(X1, X2, X3, X4, lesscK_out_ga(X1, X2)) → INSERTH_IN_AGA(X2, X3, X4)
INSERTH_IN_AGA(s(X1), tree(0, X2, X3), tree(0, X2, X4)) → INSERTH_IN_AGA(s(X1), X3, X4)
INSERTH_IN_AGA(s(X1), tree(s(X2), X3, X4), tree(s(X2), X3, X5)) → U23_AGA(X1, X2, X3, X4, X5, lesscK_in_ga(X2, X1))
U23_AGA(X1, X2, X3, X4, X5, lesscK_out_ga(X2, X1)) → INSERTH_IN_AGA(s(X1), X4, X5)

The TRS R consists of the following rules:

lesscB_in_g(s(X1)) → lesscB_out_g(s(X1))
lesscD_in_ag(0, s(X1)) → lesscD_out_ag(0, s(X1))
lesscD_in_ag(s(X1), s(X2)) → U28_ag(X1, X2, lesscD_in_ag(X1, X2))
U28_ag(X1, X2, lesscD_out_ag(X1, X2)) → lesscD_out_ag(s(X1), s(X2))
lesscF_in_gg(X1, s(X2)) → U45_gg(X1, X2, lesscG_in_gg(X1, X2))
lesscG_in_gg(0, s(X1)) → lesscG_out_gg(0, s(X1))
lesscG_in_gg(s(X1), s(X2)) → U33_gg(X1, X2, lesscG_in_gg(X1, X2))
U33_gg(X1, X2, lesscG_out_gg(X1, X2)) → lesscG_out_gg(s(X1), s(X2))
U45_gg(X1, X2, lesscG_out_gg(X1, X2)) → lesscF_out_gg(X1, s(X2))
lesscK_in_ga(0, s(X1)) → lesscK_out_ga(0, s(X1))
lesscK_in_ga(s(X1), s(X2)) → U40_ga(X1, X2, lesscK_in_ga(X1, X2))
U40_ga(X1, X2, lesscK_out_ga(X1, X2)) → lesscK_out_ga(s(X1), s(X2))

The argument filtering Pi contains the following mapping:
tree(x1, x2, x3)  =  tree(x1, x2, x3)
s(x1)  =  s(x1)
lesscB_in_g(x1)  =  lesscB_in_g(x1)
lesscB_out_g(x1)  =  lesscB_out_g(x1)
lesscD_in_ag(x1, x2)  =  lesscD_in_ag(x2)
lesscD_out_ag(x1, x2)  =  lesscD_out_ag(x1, x2)
U28_ag(x1, x2, x3)  =  U28_ag(x2, x3)
lesscF_in_gg(x1, x2)  =  lesscF_in_gg(x1, x2)
U45_gg(x1, x2, x3)  =  U45_gg(x1, x2, x3)
lesscG_in_gg(x1, x2)  =  lesscG_in_gg(x1, x2)
0  =  0
lesscG_out_gg(x1, x2)  =  lesscG_out_gg(x1, x2)
U33_gg(x1, x2, x3)  =  U33_gg(x1, x2, x3)
lesscF_out_gg(x1, x2)  =  lesscF_out_gg(x1, x2)
lesscK_in_ga(x1, x2)  =  lesscK_in_ga(x1)
lesscK_out_ga(x1, x2)  =  lesscK_out_ga(x1)
U40_ga(x1, x2, x3)  =  U40_ga(x1, x3)
INSERTH_IN_AGA(x1, x2, x3)  =  INSERTH_IN_AGA(x2)
PJ_IN_GAGA(x1, x2, x3, x4)  =  PJ_IN_GAGA(x1, x3)
U16_GAGA(x1, x2, x3, x4, x5)  =  U16_GAGA(x1, x3, x5)
U23_AGA(x1, x2, x3, x4, x5, x6)  =  U23_AGA(x2, x3, x4, x6)

We have to consider all (P,R,Pi)-chains

(45) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(46) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

INSERTH_IN_AGA(X1, tree(X2, X3, X4), tree(X2, X3, X5)) → PJ_IN_GAGA(X2, X1, X4, X5)
PJ_IN_GAGA(X1, X2, X3, X4) → U16_GAGA(X1, X2, X3, X4, lesscK_in_ga(X1, X2))
U16_GAGA(X1, X2, X3, X4, lesscK_out_ga(X1, X2)) → INSERTH_IN_AGA(X2, X3, X4)
INSERTH_IN_AGA(s(X1), tree(0, X2, X3), tree(0, X2, X4)) → INSERTH_IN_AGA(s(X1), X3, X4)
INSERTH_IN_AGA(s(X1), tree(s(X2), X3, X4), tree(s(X2), X3, X5)) → U23_AGA(X1, X2, X3, X4, X5, lesscK_in_ga(X2, X1))
U23_AGA(X1, X2, X3, X4, X5, lesscK_out_ga(X2, X1)) → INSERTH_IN_AGA(s(X1), X4, X5)

The TRS R consists of the following rules:

lesscK_in_ga(0, s(X1)) → lesscK_out_ga(0, s(X1))
lesscK_in_ga(s(X1), s(X2)) → U40_ga(X1, X2, lesscK_in_ga(X1, X2))
U40_ga(X1, X2, lesscK_out_ga(X1, X2)) → lesscK_out_ga(s(X1), s(X2))

The argument filtering Pi contains the following mapping:
tree(x1, x2, x3)  =  tree(x1, x2, x3)
s(x1)  =  s(x1)
0  =  0
lesscK_in_ga(x1, x2)  =  lesscK_in_ga(x1)
lesscK_out_ga(x1, x2)  =  lesscK_out_ga(x1)
U40_ga(x1, x2, x3)  =  U40_ga(x1, x3)
INSERTH_IN_AGA(x1, x2, x3)  =  INSERTH_IN_AGA(x2)
PJ_IN_GAGA(x1, x2, x3, x4)  =  PJ_IN_GAGA(x1, x3)
U16_GAGA(x1, x2, x3, x4, x5)  =  U16_GAGA(x1, x3, x5)
U23_AGA(x1, x2, x3, x4, x5, x6)  =  U23_AGA(x2, x3, x4, x6)

We have to consider all (P,R,Pi)-chains

(47) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(48) Obligation:

Q DP problem:
The TRS P consists of the following rules:

INSERTH_IN_AGA(tree(X2, X3, X4)) → PJ_IN_GAGA(X2, X4)
PJ_IN_GAGA(X1, X3) → U16_GAGA(X1, X3, lesscK_in_ga(X1))
U16_GAGA(X1, X3, lesscK_out_ga(X1)) → INSERTH_IN_AGA(X3)
INSERTH_IN_AGA(tree(0, X2, X3)) → INSERTH_IN_AGA(X3)
INSERTH_IN_AGA(tree(s(X2), X3, X4)) → U23_AGA(X2, X3, X4, lesscK_in_ga(X2))
U23_AGA(X2, X3, X4, lesscK_out_ga(X2)) → INSERTH_IN_AGA(X4)

The TRS R consists of the following rules:

lesscK_in_ga(0) → lesscK_out_ga(0)
lesscK_in_ga(s(X1)) → U40_ga(X1, lesscK_in_ga(X1))
U40_ga(X1, lesscK_out_ga(X1)) → lesscK_out_ga(s(X1))

The set Q consists of the following terms:

lesscK_in_ga(x0)
U40_ga(x0, x1)

We have to consider all (P,Q,R)-chains.

(49) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • PJ_IN_GAGA(X1, X3) → U16_GAGA(X1, X3, lesscK_in_ga(X1))
    The graph contains the following edges 1 >= 1, 2 >= 2

  • U16_GAGA(X1, X3, lesscK_out_ga(X1)) → INSERTH_IN_AGA(X3)
    The graph contains the following edges 2 >= 1

  • INSERTH_IN_AGA(tree(X2, X3, X4)) → PJ_IN_GAGA(X2, X4)
    The graph contains the following edges 1 > 1, 1 > 2

  • INSERTH_IN_AGA(tree(s(X2), X3, X4)) → U23_AGA(X2, X3, X4, lesscK_in_ga(X2))
    The graph contains the following edges 1 > 1, 1 > 2, 1 > 3

  • INSERTH_IN_AGA(tree(0, X2, X3)) → INSERTH_IN_AGA(X3)
    The graph contains the following edges 1 > 1

  • U23_AGA(X2, X3, X4, lesscK_out_ga(X2)) → INSERTH_IN_AGA(X4)
    The graph contains the following edges 3 >= 1

(50) YES